package com;

public class TranslateDemo {
    public static void main(String[] args) {
        double number = 100.0;
        //        int->string
        String s1 = "" + number;
        System.out.println(s1);
//方法二
        String s2 = String.valueOf(number);
        System.out.println(s2);
//        String->integer->int
        String s = "100";
        Integer i = Integer.valueOf(s);
        int x = i.intValue();
        System.out.println(x);
//方法二
        int y = Integer.parseInt(s);
        System.out.println(y);


    }
}
